<template>
  <div style="margin-top: 20px">
    <h2 class="head">定点医院相关报表</h2>
    <br />
    <el-table
      :data="tableData"
      style="width: 100%"
      :stripe="true"
      :fit="true"
      :show-header="false"
    >
      <el-table-column type="index" label="#" />
      <el-table-column prop="path" label="" align="center">
        <template #default="scope">
          <router-link target="_blank" :to="scope.row.path">{{
            $t(`menus.${scope.row.path}`)
          }}</router-link>
        </template>
      </el-table-column>
    </el-table>
    <!-- <router-view /> -->
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { getReportList } from '@/network/report';
import { useStore } from 'vuex';
const tableData = ref([]);
var route = useRoute(); //使用路由
onMounted(async () => {
  await getReportList({ role: useStore().state.app.role, path: route.name })
    .then((result) => {
      // console.info(result, '获取路径!');
      tableData.value = result;
    })
    .catch((err) => {});
});
</script>

<style lang="scss" scoped>
.head {
  text-align: center;
}
</style>
